#include <csetjmp>
#include <csignal>
#include <iostream>

#include "gtest/gtest.h"
#include "nosal/demolib/common.h"
#include "nosal/demolib/context.h"
#include "nosal/demolib/register.h"

using namespace ::testing;
using namespace netaos::nosal::demo::lib;

TEST(ContextTest, ContextEnable) {
    std::string context_id = "text_ctx";
    std::string description = "This is test for demolib";
    Context     ctx(context_id, description);

    ctx.Enable(true);
    EXPECT_TRUE(ctx.IsEnabled());
}

TEST(ContextTest, ContextDisable) {
    std::string context_id = "text_ctx";
    std::string description = "This is test for demolib";
    Context     ctx(context_id, description);

    ctx.Enable(false);
    EXPECT_FALSE(ctx.IsEnabled());
}
